package com.nmf.dao.gen;

import com.nmf.dao.gen.bean.BizCmsCategory;
import com.nmf.dao.gen.bean.BizCmsCategoryExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface BizCmsCategoryMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cms_category
     */
    @SelectProvider(type=BizCmsCategorySqlProvider.class, method="countByExample")
    long countByExample(BizCmsCategoryExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cms_category
     */
    @DeleteProvider(type=BizCmsCategorySqlProvider.class, method="deleteByExample")
    int deleteByExample(BizCmsCategoryExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cms_category
     */
    @Delete({
        "delete from cms_category",
        "where id = #{id,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cms_category
     */
    @Insert({
        "insert into cms_category (id, parent_id, ",
        "parent_ids, site_id, ",
        "office_id, module, ",
        "name, image, href, ",
        "target, description, ",
        "keywords, sort, ",
        "in_menu, in_list, show_modes, ",
        "allow_comment, is_audit, ",
        "custom_list_view, custom_content_view, ",
        "view_config, create_by, ",
        "create_date, update_by, ",
        "update_date, remarks, ",
        "del_flag)",
        "values (#{id,jdbcType=VARCHAR}, #{parentId,jdbcType=VARCHAR}, ",
        "#{parentIds,jdbcType=VARCHAR}, #{siteId,jdbcType=VARCHAR}, ",
        "#{officeId,jdbcType=VARCHAR}, #{module,jdbcType=VARCHAR}, ",
        "#{name,jdbcType=VARCHAR}, #{image,jdbcType=VARCHAR}, #{href,jdbcType=VARCHAR}, ",
        "#{target,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, ",
        "#{keywords,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, ",
        "#{inMenu,jdbcType=CHAR}, #{inList,jdbcType=CHAR}, #{showModes,jdbcType=CHAR}, ",
        "#{allowComment,jdbcType=CHAR}, #{isAudit,jdbcType=CHAR}, ",
        "#{customListView,jdbcType=VARCHAR}, #{customContentView,jdbcType=VARCHAR}, ",
        "#{viewConfig,jdbcType=LONGVARCHAR}, #{createBy,jdbcType=VARCHAR}, ",
        "#{createDate,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, ",
        "#{updateDate,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR}, ",
        "#{delFlag,jdbcType=CHAR})"
    })
    int insert(BizCmsCategory record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cms_category
     */
    @InsertProvider(type=BizCmsCategorySqlProvider.class, method="insertSelective")
    int insertSelective(BizCmsCategory record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cms_category
     */
    @SelectProvider(type=BizCmsCategorySqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="parent_id", property="parentId", jdbcType=JdbcType.VARCHAR),
        @Result(column="parent_ids", property="parentIds", jdbcType=JdbcType.VARCHAR),
        @Result(column="site_id", property="siteId", jdbcType=JdbcType.VARCHAR),
        @Result(column="office_id", property="officeId", jdbcType=JdbcType.VARCHAR),
        @Result(column="module", property="module", jdbcType=JdbcType.VARCHAR),
        @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
        @Result(column="image", property="image", jdbcType=JdbcType.VARCHAR),
        @Result(column="href", property="href", jdbcType=JdbcType.VARCHAR),
        @Result(column="target", property="target", jdbcType=JdbcType.VARCHAR),
        @Result(column="description", property="description", jdbcType=JdbcType.VARCHAR),
        @Result(column="keywords", property="keywords", jdbcType=JdbcType.VARCHAR),
        @Result(column="sort", property="sort", jdbcType=JdbcType.INTEGER),
        @Result(column="in_menu", property="inMenu", jdbcType=JdbcType.CHAR),
        @Result(column="in_list", property="inList", jdbcType=JdbcType.CHAR),
        @Result(column="show_modes", property="showModes", jdbcType=JdbcType.CHAR),
        @Result(column="allow_comment", property="allowComment", jdbcType=JdbcType.CHAR),
        @Result(column="is_audit", property="isAudit", jdbcType=JdbcType.CHAR),
        @Result(column="custom_list_view", property="customListView", jdbcType=JdbcType.VARCHAR),
        @Result(column="custom_content_view", property="customContentView", jdbcType=JdbcType.VARCHAR),
        @Result(column="view_config", property="viewConfig", jdbcType=JdbcType.LONGVARCHAR),
        @Result(column="create_by", property="createBy", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_date", property="createDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_by", property="updateBy", jdbcType=JdbcType.VARCHAR),
        @Result(column="update_date", property="updateDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR),
        @Result(column="del_flag", property="delFlag", jdbcType=JdbcType.CHAR)
    })
    List<BizCmsCategory> selectByExample(BizCmsCategoryExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cms_category
     */
    @Select({
        "select",
        "id, parent_id, parent_ids, site_id, office_id, module, name, image, href, target, ",
        "description, keywords, sort, in_menu, in_list, show_modes, allow_comment, is_audit, ",
        "custom_list_view, custom_content_view, view_config, create_by, create_date, ",
        "update_by, update_date, remarks, del_flag",
        "from cms_category",
        "where id = #{id,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="parent_id", property="parentId", jdbcType=JdbcType.VARCHAR),
        @Result(column="parent_ids", property="parentIds", jdbcType=JdbcType.VARCHAR),
        @Result(column="site_id", property="siteId", jdbcType=JdbcType.VARCHAR),
        @Result(column="office_id", property="officeId", jdbcType=JdbcType.VARCHAR),
        @Result(column="module", property="module", jdbcType=JdbcType.VARCHAR),
        @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
        @Result(column="image", property="image", jdbcType=JdbcType.VARCHAR),
        @Result(column="href", property="href", jdbcType=JdbcType.VARCHAR),
        @Result(column="target", property="target", jdbcType=JdbcType.VARCHAR),
        @Result(column="description", property="description", jdbcType=JdbcType.VARCHAR),
        @Result(column="keywords", property="keywords", jdbcType=JdbcType.VARCHAR),
        @Result(column="sort", property="sort", jdbcType=JdbcType.INTEGER),
        @Result(column="in_menu", property="inMenu", jdbcType=JdbcType.CHAR),
        @Result(column="in_list", property="inList", jdbcType=JdbcType.CHAR),
        @Result(column="show_modes", property="showModes", jdbcType=JdbcType.CHAR),
        @Result(column="allow_comment", property="allowComment", jdbcType=JdbcType.CHAR),
        @Result(column="is_audit", property="isAudit", jdbcType=JdbcType.CHAR),
        @Result(column="custom_list_view", property="customListView", jdbcType=JdbcType.VARCHAR),
        @Result(column="custom_content_view", property="customContentView", jdbcType=JdbcType.VARCHAR),
        @Result(column="view_config", property="viewConfig", jdbcType=JdbcType.LONGVARCHAR),
        @Result(column="create_by", property="createBy", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_date", property="createDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_by", property="updateBy", jdbcType=JdbcType.VARCHAR),
        @Result(column="update_date", property="updateDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR),
        @Result(column="del_flag", property="delFlag", jdbcType=JdbcType.CHAR)
    })
    BizCmsCategory selectByPrimaryKey(String id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cms_category
     */
    @UpdateProvider(type=BizCmsCategorySqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") BizCmsCategory record, @Param("example") BizCmsCategoryExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cms_category
     */
    @UpdateProvider(type=BizCmsCategorySqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") BizCmsCategory record, @Param("example") BizCmsCategoryExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cms_category
     */
    @UpdateProvider(type=BizCmsCategorySqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(BizCmsCategory record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cms_category
     */
    @Update({
        "update cms_category",
        "set parent_id = #{parentId,jdbcType=VARCHAR},",
          "parent_ids = #{parentIds,jdbcType=VARCHAR},",
          "site_id = #{siteId,jdbcType=VARCHAR},",
          "office_id = #{officeId,jdbcType=VARCHAR},",
          "module = #{module,jdbcType=VARCHAR},",
          "name = #{name,jdbcType=VARCHAR},",
          "image = #{image,jdbcType=VARCHAR},",
          "href = #{href,jdbcType=VARCHAR},",
          "target = #{target,jdbcType=VARCHAR},",
          "description = #{description,jdbcType=VARCHAR},",
          "keywords = #{keywords,jdbcType=VARCHAR},",
          "sort = #{sort,jdbcType=INTEGER},",
          "in_menu = #{inMenu,jdbcType=CHAR},",
          "in_list = #{inList,jdbcType=CHAR},",
          "show_modes = #{showModes,jdbcType=CHAR},",
          "allow_comment = #{allowComment,jdbcType=CHAR},",
          "is_audit = #{isAudit,jdbcType=CHAR},",
          "custom_list_view = #{customListView,jdbcType=VARCHAR},",
          "custom_content_view = #{customContentView,jdbcType=VARCHAR},",
          "view_config = #{viewConfig,jdbcType=LONGVARCHAR},",
          "create_by = #{createBy,jdbcType=VARCHAR},",
          "create_date = #{createDate,jdbcType=TIMESTAMP},",
          "update_by = #{updateBy,jdbcType=VARCHAR},",
          "update_date = #{updateDate,jdbcType=TIMESTAMP},",
          "remarks = #{remarks,jdbcType=VARCHAR},",
          "del_flag = #{delFlag,jdbcType=CHAR}",
        "where id = #{id,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(BizCmsCategory record);
}